home *** CD-ROM | disk | FTP | other *** search
File List | 1985-08-09 | 31.3 KB | 727 lines |
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 1
- Line : B Statement
-
- 1 : + 0 {$I Var.Inc}
- 2 : + 0 CONST MaxScreens = 8; { Number of Windows Allowed, do not Change }
- 3 : + 0 Screen_seg = $B800; { Change to #B000 for MonoChrome, Change
- 4 : + 0 then # sign to a Dollar sign Though. }
- 5 : + 0 Data_Addr = $0000;
- 6 : + 0 Fc : ARRAY[1..4, 1..7] OF Integer
- 7 : + 0 = ((218, 196, 191, 179, 192, 196, 217),
- 8 : + 0 (201, 205, 187, 186, 200, 205, 188),
- 9 : + 0 (213, 205, 184, 179, 212, 205, 190),
- 10 : + 0 (219, 219, 219, 219, 219, 219, 219));
- 11 : + 0
- 12 : + 0 TYPE maxstr = STRING[80];
- 13 : + 0 window_rec = RECORD
- 14 : + 0 x1,x2,y1,y2,c1,b1,w1,w2: Integer;
- 15 : + 0 Screen: ARRAY[1..4000] OF byte;
- 16 : + 0 END;
- 17 : + 0
- 18 : + 0 VAR Stack_Top,Last_Window_Num,
- 19 : + 0 line_pos,F1 : Integer;
- 20 : + 0 screen : ARRAY[1..4000] OF byte;
- 21 : + 0 real_screen : ARRAY[1..4000] OF byte ABSOLUTE Screen_Seg:Data_Addr;
- 22 : + 0 Page_1 : ARRAY[1..4000] OF byte ABSOLUTE Screen_Seg:$1000;
- 23 : + 0 Imig : ARRAY [1..MaxScreens] OF Window_rec;
- 24 : + 0 Original : ARRAY[1..4000] OF byte;
- 25 : + 0 Coords : ARRAY[1..8,1..MaxScreens] OF Integer;
- 26 : + 0 {$I Windmngr.Inc}
- 27 : + 0 { Window Manager/Editor System Include file .. }
- 28 : + 0
- 29 : + 0 PROCEDURE set_page(page: byte);
- 30 : + 0
- 31 : + 0 TYPE
- 32 : + 0 Result =
- 33 : + 0 RECORD
- 34 : + 0 AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: byte;
- 35 : + 0 END;
- 36 : + 0 VAR rec:result;
- 37 : + 0
- 38 : + 1 BEGIN
- 39 : + 1 | Rec.AX := page;
- 40 : + 1 | Rec.BX := $05;
- 41 : + 1 | Intr($10,Rec);
- 42 : + 0 END;
- 43 : + 0
- 44 : + 0 PROCEDURE Scrn_off;
- 45 : + 1 BEGIN
- 46 : + 1 | INLINE($52/$50/$ba/$d8/$03/$b0/$21/$ee/$58/$5a)
- 47 : + 0 END;
- 48 : + 0
- 49 : + 0 PROCEDURE Scrn_on;
- 50 : + 1 BEGIN
- 51 : + 1 | INLINE($52/$50/$ba/$d8/$03/$b0/$29/$ee/$58/$5a)
- 52 : + 0 END;
- 53 : + 0
- 54 : + 0 FUNCTION active: integer;
- 55 : + 1 BEGIN
- 56 : + 1 | active:=stack_top
- 57 : + 0 END;
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 2
- Line : B Statement
-
- 58 : + 0
- 59 : + 0 PROCEDURE Push(Ulx, Uly, Lrx, Lry, Foreground, Background: integer);
- 60 : + 0
- 61 : + 0 { This procedure Saves screens in memory. When a new window is put
- 62 : + 0 on the Screen, the preceding window is stored away for later reference.}
- 63 : + 0
- 64 : + 1 BEGIN
- 65 : + 1 | { If last Window up, move the Original Screen into Screen Memory}
- 66 : + 1 | IF stack_top = 0 THEN
- 67 : + 2 | BEGIN
- 68 : + 2 | | Scrn_off;
- 69 : + 2 | | move(real_screen, Original, 4000);
- 70 : + 2 | | Scrn_on
- 71 : + 1 | END;
- 72 : + 1 | {Save all Data concerning the windows}
- 73 : + 1 | IF (Stack_top < MaxScreens) AND (Stack_Top >= 0) THEN
- 74 : + 2 | BEGIN
- 75 : + 2 | | Stack_top:=Stack_top+1;
- 76 : + 2 | | Imig[Stack_top].x1:=Ulx;
- 77 : + 2 | | Imig[Stack_top].y1:=Uly;
- 78 : + 2 | | Imig[Stack_top].x2:=Lrx;
- 79 : + 2 | | Imig[Stack_top].y2:=Lry;
- 80 : + 2 | | Imig[stack_top].c1:=Foreground;
- 81 : + 2 | | Imig[Stack_top].b1:=Background
- 82 : + 1 | END;
- 83 : + 1 |
- 84 : + 1 | { Push Screen on Stack ... Sort of... }
- 85 : + 1 | Scrn_off;
- 86 : + 1 | Move(real_screen,Imig[Stack_top].Screen,4000);
- 87 : + 1 | Scrn_on
- 88 : + 0 END;
- 89 : + 0
- 90 : + 0 PROCEDURE Pop;
- 91 : + 0
- 92 : + 0 { This Procedure takes the screen that procedes the current window and
- 93 : + 0 Copies back to screen memory, restores all data concerning the previous
- 94 : + 0 window and activates it.. Neat huh? }
- 95 : + 0
- 96 : + 1 BEGIN
- 97 : + 1 |
- 98 : + 1 | { If no windows are active, save the current screen }
- 99 : + 1 | IF stack_top =0 THEN
- 100 : + 2 | BEGIN
- 101 : + 2 | | normvideo;
- 102 : + 2 | | window(1,1,80,25);
- 103 : + 2 | | Scrn_off;
- 104 : + 2 | | move(Original, real_screen, 4000);
- 105 : + 2 | | Scrn_on;
- 106 : + 1 | END;
- 107 : + 1 |
- 108 : + 1 | { Get Preceding screen and copy it to screen memory }
- 109 : + 1 | Scrn_off;
- 110 : + 1 | Move(Imig[Stack_top].Screen,Real_Screen,4000);
- 111 : + 1 | Scrn_on;
- 112 : + 1 | Stack_top:=Stack_top-1
- 113 : + 0 END;
- 114 : + 0
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 3
- Line : B Statement
-
- 115 : + 0 PROCEDURE Writexy(long_string:maxstr; xcoord,ycoord:integer; VAR color: inte
- 115 : + 0 ger);
- 116 : + 0
- 117 : + 0 { This procedure Draws whatever you want, wherever you want, by changing the
- 118 : + 0 value of Screen in the variable declaration, it can draw a "Picture" any-
- 119 : + 0 were in memory. This allows for the Speed of the window making process..}
- 120 : + 0
- 121 : + 0 VAR str_len, real_pos, scr_pos: integer;
- 122 : + 0
- 123 : + 1 BEGIN
- 124 : + 1 | {$I-}
- 125 : + 1 | str_len:=length(long_string); { So I know how much to write }
- 126 : + 1 | Scr_pos:=0;
- 127 : + 1 |
- 128 : + 1 | { The next 8 lines write the string in every "even" location in memory
- 129 : + 1 | and ever odd location gets the attribute with determines how the
- 130 : + 1 | string is displayed on the screen}
- 131 : + 1 | FOR real_pos:=1 TO str_len DO
- 132 : + 1 | IF scr_pos < 4001 THEN
- 133 : + 2 | BEGIN
- 134 : + 2 | | scr_pos:=((xcoord*2)-1)+(ycoord*160);
- 135 : + 2 | | screen[scr_pos]:=ord(copy(long_string,real_pos,1));
- 136 : + 2 | | screen[scr_pos+1]:=color;
- 137 : + 2 | | xcoord:=xcoord+1;
- 138 : + 1 | END
- 139 : + 1 | {$I+}
- 140 : + 0 END;
- 141 : + 0
- 142 : + 0 PROCEDURE Frame(WindowType, UpperLeftX, UpperLeftY, LowerRightX, LowerRightY
- 142 : + 0 , color: Integer);
- 143 : + 0
- 144 : + 0 { This procedure draws the window frame in another part of memory. }
- 145 : + 0 VAR i: integer;
- 146 : + 1 BEGIN
- 147 : + 1 | WriteXY(chr(Fc[WindowType,1]),UpperLeftX, UpperLeftY,color);
- 148 : + 1 | FOR i:=UpperLeftX+1 TO LowerRightX-1 DO WriteXY(chr(Fc[WindowType,2]),i,
- 148 : + 1 | UpperleftY,color);
- 149 : + 1 | WriteXY(chr(Fc[WindowType,3]),i+1,UpperleftY,color);
- 150 : + 1 | FOR i:=UpperLeftY+1 TO LowerRightY-1 DO
- 151 : + 2 | BEGIN
- 152 : + 2 | | WriteXY(chr(Fc[WindowType,4]),UpperLeftX , i,color);
- 153 : + 2 | | WriteXY(chr(Fc[WindowType,4]),LowerRightX, i,color);
- 154 : + 1 | END;
- 155 : + 1 | WriteXY(chr(Fc[WindowType,5]),UpperLeftX, LowerRightY, color);
- 156 : + 1 | FOR i:=UpperLeftX+1 TO LowerRightX-1 DO WriteXY(chr(Fc[WindowType,6]),i,
- 156 : + 1 | LowerrightY,color);
- 157 : + 1 | WriteXY(chr(Fc[WindowType,7]),i+1,LowerRightY,color);
- 158 : + 0 END { Frame };
- 159 : + 0
- 160 : + 0 PROCEDURE initialize;
- 161 : + 0
- 162 : + 0 { Set up memory and the stack }
- 163 : + 0
- 164 : + 0 VAR i:integer;
- 165 : + 0
- 166 : + 1 BEGIN
- 167 : + 1 | Stack_top:=0;
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 4
- Line : B Statement
-
- 168 : + 1 | move(real_screen,screen,4000);
- 169 : + 1 | WITH imig[1] DO FOR i:=1 TO 4000 DO screen[i]:=$00;
- 170 : + 1 | FOR i:=2 TO 9 DO move(Imig[i-1].screen,imig[i].screen,4000);
- 171 : + 1 | move(imig[1].screen,screen,4000);
- 172 : + 1 | move(imig[1].screen,original,4000)
- 173 : + 0 END;
- 174 : + 0
- 175 : + 0 PROCEDURE Add_window(UpperLeftX,UpperLeftY,LowerRightX,LowerRightY,Foregroun
- 175 : + 0 d,
- 176 : + 0 BackGround, WindowType: Integer);
- 177 : + 0
- 178 : + 0 { This procedure does all the laborous work for you.. The variables make it
- 179 : + 0 Fairly easy to understand. }
- 180 : + 0
- 181 : + 0 VAR i,j,k,Color: Integer;
- 182 : + 0
- 183 : + 1 BEGIN
- 184 : + 1 | Imig[Stack_top].w1:=whereX;
- 185 : + 1 | Imig[Stack_top].w2:=WhereY;
- 186 : + 1 | UpperLeftX:=UpperLeftX+1;
- 187 : + 1 | LowerRightX:=LowerRightX-1;
- 188 : + 1 | LowerRightY:=LowerRightY-2;
- 189 : + 1 | f1:=WindowType;color:=0;
- 190 : + 1 | Scrn_off;
- 191 : + 1 | move(real_screen,screen,4000);
- 192 : + 1 | Scrn_on;
- 193 : + 1 |
- 194 : + 1 | { Set color attribute for direct writeng to memory }
- 195 : + 1 | IF background < 17 THEN Color:=foreground+(background*16);
- 196 : + 1 |
- 197 : + 1 | { Check for invalid window frame types }
- 198 : + 1 | IF (WindowType > 5) OR (WindowType < 0) THEN
- 199 : + 2 | BEGIN
- 200 : + 2 | | Clrscr;
- 201 : + 2 | | Writeln('Invalid Frame Type!')
- 202 : + 1 | END
- 203 : + 1 | ELSE
- 204 : + 1 |
- 205 : + 1 | { If the window is valid then Procede }
- 206 : + 2 | BEGIN
- 207 : + 2 | |
- 208 : + 2 | | { Fill color Attribute of window directly into memory }
- 209 : + 2 | | k:=1;
- 210 : + 2 | | FOR j:=UpperLeftY TO LowerRightY DO
- 211 : + 2 | | FOR i:=UpperLeftX TO LowerRightX DO
- 212 : + 3 | | BEGIN
- 213 : + 3 | | | k:=(j*160)+(i*2);
- 214 : + 3 | | | Screen[k]:=Color;
- 215 : + 3 | | | Screen[k-1]:=$20
- 216 : + 2 | | END;
- 217 : + 2 | |
- 218 : + 2 | | { Frame Window }
- 219 : + 3 | | CASE Windowtype OF
- 220 : + 3 | | | 1:Frame(WindowType,UpperLeftX-1,UpperLeftY-1,
- 221 : + 3 | | | LowerRightX+1,LowerRightY+1,
- 222 : + 3 | | | color);
- 223 : + 3 | | | 2:Frame(WindowType,UpperLeftX-1,UpperLeftY-1,
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 5
- Line : B Statement
-
- 224 : + 3 | | | LowerRightX+1,LowerRightY+1,
- 225 : + 3 | | | color);
- 226 : + 3 | | | 3:Frame(WindowType,UpperLeftX-1,UpperLeftY-1,
- 227 : + 3 | | | LowerRightX+1,LowerRightY+1,
- 228 : + 3 | | | color);
- 229 : + 3 | | | 4:Frame(WindowType,UpperLeftX-1,UpperLeftY-1,
- 230 : + 3 | | | LowerRightX+1,LowerRightY+1,
- 231 : + 3 | | | color);
- 232 : + 2 | | END { Case }
- 233 : + 1 | END;
- 234 : + 1 |
- 235 : + 1 | { Activate newly formed window }
- 236 : + 1 | Window(1,1,80,25);
- 237 : + 1 | Window(UpperLeftX,UpperLeftY+1,LowerRightX,LowerRightY+1);
- 238 : + 1 | push(UpperLeftx,UpperLeftY+1,LowerRightX,LowerRightY+1,Foreground, Backg
- 238 : + 1 | round);
- 239 : + 1 | Scrn_off;
- 240 : + 1 | Move(screen,real_screen,4000);gotoxy(1,1);
- 241 : + 1 | Scrn_on;
- 242 : + 1 | Textcolor(Foreground);TextBackground(backGround);ClrScr;
- 243 : + 0 END;
- 244 : + 0
- 245 : + 0 PROCEDURE Color_window(Foreground, Background: integer);
- 246 : + 0
- 247 : + 0 { This procedure allows you to change the foreground and background color
- 248 : + 0 of the active window. }
- 249 : + 0
- 250 : + 0 VAR i,j,Color: Integer;
- 251 : + 0
- 252 : + 1 BEGIN
- 253 : + 1 |
- 254 : + 1 | { Set Attribute value }
- 255 : + 1 | IF background < 8 THEN Color:=foreground+(background*16);
- 256 : + 1 |
- 257 : + 1 | { Write new attribute direclty to screen memory }
- 258 : + 1 | FOR j:=(Imig[Stack_top].y1-2) TO Imig[Stack_top].y2 DO
- 259 : + 1 | FOR i:=(Imig[Stack_top].x1-1) TO (Imig[Stack_top].x2+1) DO
- 260 : + 2 | BEGIN
- 261 : + 2 | | Real_Screen[(j*160)+(i*2)]:=Color
- 262 : + 1 | END
- 263 : + 0 END;
- 264 : + 0
- 265 : + 0 PROCEDURE Remove(Num_to_Remove: Integer);
- 266 : + 0
- 267 : + 0 { This Procedure removes 1 or a specified number of windows from the
- 268 : + 0 screen and reactivates the underlying window }
- 269 : + 0
- 270 : + 0 VAR i: integer;
- 271 : + 1 BEGIN
- 272 : + 1 | IF (Num_to_Remove > 0) AND (Num_to_Remove < MaxScreens) THEN
- 273 : + 1 | FOR i:=1 TO Num_to_remove DO Pop
- 274 : + 1 | ELSE
- 275 : + 1 | Pop;
- 276 : + 1 | Window(1,1,80,25);
- 277 : + 1 | Window(Imig[Stack_top].x1+1,Imig[Stack_top].y1,Imig[Stack_top].x2,Imig[S
- 277 : + 1 | tack_top].y2);
- 278 : + 1 | gotoxy(1,1);
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 6
- Line : B Statement
-
- 279 : + 1 | TextBackground(Imig[Stack_top].b1);TextColor(Imig[Stack_top].c1);
- 280 : + 1 | GotoXY((Imig[Stack_top].w1-1),Imig[Stack_top].w2)
- 281 : + 0 END;
- 282 : + 0
- 283 : + 0 PROCEDURE Window_Title(Name: Maxstr; color:integer);
- 284 : + 0
- 285 : + 0 VAR i, k, l, m: integer;
- 286 : + 0
- 287 : + 1 BEGIN
- 288 : + 1 | IF Length(name)>0 THEN
- 289 : + 2 | BEGIN
- 290 : + 2 | | l:=1;
- 291 : + 2 | | color:=color+(Imig[Stack_top].b1*16);
- 292 : + 2 | | IF f1 < 4 THEN Real_Screen[(((Imig[Stack_top].Y1-2)*160)+(Imig[Stack
- 292 : + 2 | | _top].X1*2))+l]:=$5b;
- 293 : + 2 | | FOR i:=1 TO length(Name) DO
- 294 : + 3 | | BEGIN
- 295 : + 3 | | | k:=(((Imig[Stack_top].Y1-2)*160)+(Imig[Stack_top].X1*2))+l+1;
- 296 : + 3 | | | Real_Screen[k+1]:=ord(copy(Name,i,1));
- 297 : + 3 | | | Real_Screen[k+2]:=color;
- 298 : + 3 | | | l:=l+2
- 299 : + 2 | | END;
- 300 : + 2 | | IF f1 < 4 THEN Real_Screen[k+3]:=$5d
- 301 : + 1 | END
- 302 : + 0 END;
- 303 : + 0
- 304 : + 0 { Thats all.. }
- 305 : + 0
- 306 : + 0
- 307 : + 0
- 308 : + 0 {$I DemoDefs.Inc}
- 309 : + 0 PROCEDURE Select_Window(Win_Num: Integer);
- 310 : + 0 CONST Windows: ARRAY[1..9,1..8] OF integer =((5,5,40,15,12,0,2,0),
- 311 : + 0 (43,5,73,15,10,0,3,12),
- 312 : + 0 (5,16,73,23,9,0,1,0),
- 313 : + 0 (0,0,0,0,0,0,0,0),
- 314 : + 0 (0,0,0,0,0,0,0,0),
- 315 : + 0 (0,0,0,0,0,0,0,0),
- 316 : + 0 (0,0,0,0,0,0,0,0),
- 317 : + 0 (0,0,0,0,0,0,0,0),
- 318 : + 0 (0,0,0,0,0,0,0,0));
- 319 : + 0
- 320 : + 0 Title:ARRAY[1..9] OF STRING[80] = ('',
- 321 : + 0 'TEST TITLE',
- 322 : + 0 '',
- 323 : + 0 '',
- 324 : + 0 '',
- 325 : + 0 '',
- 326 : + 0 '',
- 327 : + 0 '',
- 328 : + 0 '');
- 329 : + 0
- 330 : + 1 BEGIN
- 331 : + 1 | IF (windows[win_num,3] > 0) AND (Win_num > Stack_top) THEN
- 332 : + 2 | BEGIN
- 333 : + 2 | | Add_Window(Windows[Win_Num,1],
- 334 : + 2 | | Windows[Win_Num,2],
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 7
- Line : B Statement
-
- 335 : + 2 | | Windows[Win_Num,3],
- 336 : + 2 | | Windows[Win_Num,4],
- 337 : + 2 | | Windows[Win_Num,5],
- 338 : + 2 | | Windows[Win_Num,6],
- 339 : + 2 | | Windows[Win_Num,7]);
- 340 : + 2 | | IF Title[win_num] <> '' THEN
- 341 : + 2 | | Window_Title(Title[Win_num],Windows[Win_Num,8])
- 342 : + 1 | END
- 343 : + 1 | ELSE
- 344 : + 1 | IF windows[Win_num,4] > 0 THEN
- 345 : + 2 | BEGIN
- 346 : + 2 | | Imig[Last_window_num].w1:=wherex;
- 347 : + 2 | | Imig[Last_window_num].w2:=wherey;
- 348 : + 2 | | Window(1,1,80,25);
- 349 : + 2 | | GotoXY(1,1);
- 350 : + 2 | | Window(Imig[Win_num].x1,Imig[Win_num].y1,
- 351 : + 2 | | Imig[win_num].x2,Imig[win_num].y2);
- 352 : + 2 | | Textcolor(Imig[win_num].c1+(Imig[win_num].b1*16));
- 353 : + 2 | | GotoXY(1,1);
- 354 : + 2 | | GotoXY(Imig[win_num].w1,Imig[win_num].w2);
- 355 : + 2 | | Last_Window_Num:=Win_Num
- 356 : + 1 | END
- 357 : + 0 END;
- 358 : + 0 {$I Growwin.Inc}
- 359 : + 0 PROCEDURE Write_Screen(long_string:maxstr; xcoord,ycoord,color: integer);
- 360 : + 0
- 361 : + 0 VAR str_len, real_pos, scr_pos: integer;
- 362 : + 0
- 363 : + 1 BEGIN
- 364 : + 1 | str_len:=length(long_string);
- 365 : + 1 | Scr_pos:=0;
- 366 : + 1 | FOR real_pos:=1 TO str_len DO
- 367 : + 1 | IF scr_pos < 4001 THEN
- 368 : + 2 | BEGIN
- 369 : + 2 | | scr_pos:=((xcoord*2)-1)+(ycoord*160);
- 370 : + 2 | | Page_1[scr_pos]:=ord(copy(long_string,real_pos,1));
- 371 : + 2 | | Page_1[scr_pos+1]:=Color;
- 372 : + 2 | | xcoord:=xcoord+1;
- 373 : + 1 | END
- 374 : + 0 END;
- 375 : + 0
- 376 : + 0 PROCEDURE Grow_Frame(WindowType, UpperLeftX, UpperLeftY, LowerRightX, LowerR
- 376 : + 0 ightY, color: Integer);
- 377 : + 0 VAR i: integer;
- 378 : + 1 BEGIN
- 379 : + 1 | Write_Screen(chr(Fc[WindowType,1]),UpperLeftX, UpperLeftY,Color);
- 380 : + 1 | FOR i:=UpperLeftX+1 TO LowerRightX-1 DO Write_Screen(chr(Fc[WindowType,2
- 380 : + 1 | ]),i,UpperleftY,color);
- 381 : + 1 | Write_Screen(chr(Fc[WindowType,3]),i+1,UpperleftY,color);
- 382 : + 1 | FOR i:=UpperLeftY+1 TO LowerRightY-1 DO
- 383 : + 2 | BEGIN
- 384 : + 2 | | Write_Screen(chr(Fc[WindowType,4]),UpperLeftX , i,color);
- 385 : + 2 | | Write_Screen(chr(Fc[WindowType,4]),LowerRightX, i,color);
- 386 : + 1 | END;
- 387 : + 1 | Write_Screen(chr(Fc[WindowType,5]),UpperLeftX, LowerRightY, color);
- 388 : + 1 | FOR i:=UpperLeftX+1 TO LowerRightX-1 DO Write_Screen(chr(Fc[WindowType,6
- 388 : + 1 | ]),i,LowerrightY,color);
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 8
- Line : B Statement
-
- 389 : + 1 | Write_Screen(chr(Fc[WindowType,7]),i+1,LowerRightY,color)
- 390 : + 0 END ;
- 391 : + 0
- 392 : + 0 PROCEDURE Grow_Window(x1,y1,x2,y2,c1,c2,wt:integer);
- 393 : + 0
- 394 : + 0
- 395 : + 0 VAR i,j,p1,p2,p3,p4,sl,knt:integer;
- 396 : + 0
- 397 : + 1 BEGIN
- 398 : + 1 | p1:=x1+trunc((x2-x1)/2);
- 399 : + 1 | p2:=y1+trunc((y2-(y1))/2);
- 400 : + 1 | p3:=p1;
- 401 : + 1 | p4:=p2;
- 402 : + 1 | Scrn_off;
- 403 : + 1 | Move(real_Screen,page_1,4000);
- 404 : + 1 | Scrn_on;
- 405 : + 1 | Set_page($01);
- 406 : + 1 | IF p1>p2 THEN knt:=trunc((x2-x1)/2)
- 407 : + 1 | ELSE knt:=trunc((y2-y1)/2);
- 408 : + 1 | y1:=y1-1;
- 409 : + 1 | y2:=y2-1;
- 410 : + 1 | x1:=x1+1;
- 411 : + 1 | x2:=x2-1;
- 412 : + 1 | FOR sl:=1 TO round(Knt/3) DO
- 413 : + 2 | BEGIN
- 414 : + 2 | | IF p1>(x1-2) THEN
- 415 : + 2 | | p1:=p1-3
- 416 : + 2 | | ELSE
- 417 : + 2 | | IF p1>(x1-1) THEN
- 418 : + 2 | | p1:=p1-2
- 419 : + 2 | | ELSE
- 420 : + 2 | | IF p1>x1 THEN
- 421 : + 2 | | p1:=p1-1;
- 422 : + 2 | | IF p3<(x2+2) THEN
- 423 : + 2 | | p3:=p3+3
- 424 : + 2 | | ELSE
- 425 : + 2 | | IF p3<(x2+1) THEN
- 426 : + 2 | | p3:=p3+2
- 427 : + 2 | | ELSE
- 428 : + 2 | | IF p3<x2 THEN
- 429 : + 2 | | p3:=p3+1;
- 430 : + 2 | | IF p2>(y1+2) THEN
- 431 : + 2 | | p2:=p2-3
- 432 : + 2 | | ELSE
- 433 : + 2 | | IF p2>(y1+1) THEN
- 434 : + 2 | | p2:=p2-2
- 435 : + 2 | | ELSE
- 436 : + 2 | | IF p2>y1 THEN
- 437 : + 2 | | p2:=p2-1;
- 438 : + 2 | | IF p4<(y2-2) THEN
- 439 : + 2 | | p4:=p4+3
- 440 : + 2 | | ELSE
- 441 : + 2 | | IF p4<(y2-1) THEN
- 442 : + 2 | | p4:=p4+2
- 443 : + 2 | | ELSE
- 444 : + 2 | | IF p4<y2 THEN
- 445 : + 2 | | p4:=p4+1;
- 09 Aug 1985 at 08 : 30 Formated Listing for : DEFDEMO.PAS Page 9
- Line : B Statement
-
- 446 : + 2 | | Normvideo;
- 447 : + 2 | | window(p1,p2,p3,p4);
- 448 : + 2 | | clrscr;
- 449 : + 2 | | Grow_frame(wt,p1,p2,p3,p4,(c1+(c2*16)));
- 450 : + 1 | END;
- 451 : + 1 | p2:=p2+1;
- 452 : + 1 | p4:=p4+1;
- 453 : + 1 | Add_Window(p1,p2,p3,p4,c1,c2,wt);
- 454 : + 1 | Set_page($00)
- 455 : + 0 END;
- 456 : 0
- 457 : 0 VAR ch:char;
- 458 : 0 i:integer;
- 459 : 0
- 460 : 1 BEGIN
- 461 : 1 | Initialize;
- 462 : 1 | clrscr;
- 463 : 1 | i:=0;
- 464 : 1 | Select_window(1);
- 465 : 1 | Select_Window(2);
- 466 : 1 | Select_Window(3);
- 467 : 2 | REPEAT
- 468 : 2 | | Select_Window(1);
- 469 : 2 | | Write('Window number 1 ');
- 470 : 2 | | Select_window(2);
- 471 : 2 | | write('Window number 2 ');
- 472 : 2 | | Select_window(3);
- 473 : 2 | | write('Window number 3 ');
- 474 : 2 | | i:=i+1;
- 475 : 2 | | IF i=40 THEN
- 476 : 3 | | BEGIN
- 477 : 3 | | | Grow_window(22,7,58,22,14,0,2);
- 478 : 3 | | | textcolor(2);
- 479 : 3 | | | FOR i:=1 TO 100 DO
- 480 : 4 | | | BEGIN
- 481 : 4 | | | | write(' Growing Window ');
- 482 : 4 | | | | delay(10)
- 483 : 3 | | | END;
- 484 : 3 | | | delay(1000);
- 485 : 3 | | | remove(1);
- 486 : 3 | | | i:=0
- 487 : 2 | | END
- 488 : 1 | UNTIL keypressed
- 489 : 0 END.
- 09 Aug 1985 at 08 : 30 Cross Reference for : DEFDEMO.PAS Page 1
-
- A 46 51
- ACTIVE 54 56
- ADD_WINDOW 175 333 453
- AX 34 39
- B 292
- B0 46 51
- B1 14 81 279 291 352
- B800 3
- BA 46 51
- BACKGROUND 59 81 176 195 195 238 242 245 255 255
- BP 34
- BX 34 40
- BYTE 15 20 21 22 24 29 34
- C1 14 80 279 352 392 449 453
- C2 392 449 453
- CH 457
- CHAR 457
- CHR 147 148 149 152 153 155 156 157 379 380 381
- 381 384 385 387 388 389
- CLRSCR 200 242 448 462
- COLOR 115 136 142 147 148 149 152 153 155 156 157
- 157 181 189 195 214 222 225 228 231 250 255
- 255 261 283 291 291 297 359 371 376 379 380
- 380 381 384 385 387 388 389
- COLOR_WINDOW 245
- COORDS 25
- COPY 135 296 370
- CX 34
- D 300
- D8 46 51
- DATA_ADDR 5 21
- DELAY 482 484
- DI 34
- DS 34
- DX 34
- EE 46 51
- ES 34
- F1 19 189 292 300
- FC 6 147 148 149 152 153 155 156 157 379 380
- 380 381 384 385 387 388 389
- FLAGS 34
- FOREGROUND 59 80 175 195 238 242 245 255
- FRAME 142 220 223 226 229
- GOTOXY 240 278 280 349 353 354
- GROW_FRAME 376 449
- GROW_WINDOW 392 477
- I 145 148 148 149 150 152 153 156 156 157 164
- 164 169 169 170 170 170 181 211 213 250 259
- 259 261 270 273 285 293 296 377 380 380 381
- 381 382 384 385 388 388 389 395 458 463 474
- 474 474 475 479 486
- IMIG 23 76 77 78 79 80 81 86 110 169 170
- 170 170 171 172 184 185 258 258 259 259 277
- 277 277 277 277 279 279 280 280 291 292 292
- 292 295 295 346 347 350 350 351 351 352 352
- 352 354 354
- INITIALIZE 160 461
- INTEGER 6 14 19 25 54 59 115 115 121 142 145
- 09 Aug 1985 at 08 : 30 Cross Reference for : DEFDEMO.PAS Page 2
-
- 145 164 176 181 245 250 265 270 283 285 309
- 309 310 359 361 376 377 392 395 458
- INTR 41
- J 181 210 213 250 258 261 395
- K 181 209 213 214 215 285 295 296 297 300
- KEYPRESSED 488
- KNT 395 406 407 412
- L 285 290 292 295 298 298
- LAST_WINDOW_NUM 18 346 347 355
- LENGTH 125 288 293 364
- LINE_POS 19
- LONG_STRING 115 125 135 359 364 370
- LOWERRIGHTX 142 148 153 156 175 187 187 211 221 224 227
- 227 230 237 238 376 380 385 388
- LOWERRIGHTY 142 150 155 156 157 175 188 188 210 221 224
- 224 227 230 237 238 376 382 387 388 389
- LRX 59 78
- LRY 59 79
- M 285
- MAXSCREENS 2 23 25 73 272
- MAXSTR 12 115 283 359
- MOVE 69 86 104 110 168 170 171 172 191 240 403
- NAME 283 288 293 296
- NORMVIDEO 101 446
- NUM_TO_REMOVE 265 272 272 273
- ORD 135 296 370
- ORIGINAL 24 69 104 172
- P1 395 398 400 406 414 415 415 417 418 418 420
- 420 421 421 447 449 453
- P2 395 399 401 406 430 431 431 433 434 434 436
- 436 437 437 447 449 451 451 453
- P3 395 400 422 423 423 425 426 426 428 429 429
- 429 447 449 453
- P4 395 401 438 439 439 441 442 442 444 445 445
- 445 447 449 452 452 453
- PAGE 29 39
- PAGE_1 22 370 371 403
- POP 90 273 275
- PUSH 59 238
- REAL_POS 121 131 135 361 366 370
- REAL_SCREEN 21 69 86 104 110 168 191 240 261 292 296
- 296 297 300 403
- REC 36 39 40 41
- REMOVE 265 485
- RESULT 32 36
- ROUND 412
- SCREEN 15 20 86 110 135 136 168 169 170 170 171
- 171 171 172 191 214 215 240
- SCREEN_SEG 3 21 22
- SCRN_OFF 44 68 85 103 109 190 239 402
- SCRN_ON 49 70 87 105 111 192 241 404
- SCR_POS 121 126 132 134 135 136 361 365 367 369 370
- 370 371
- SELECT_WINDOW 309 464 465 466 468 470 472
- SET_PAGE 29 405 454
- SI 34
- SL 395 412
- STACK_TOP 18 56 66 73 73 75 75 76 77 78 79
- 09 Aug 1985 at 08 : 30 Cross Reference for : DEFDEMO.PAS Page 3
-
- 79 80 81 86 99 110 112 112 167 184 185
- 185 258 258 259 259 277 277 277 277 279 279
- 279 280 280 291 292 292 295 295 331
- STR_LEN 121 125 131 361 364 366
- TEXTBACKGROUND 242 279
- TEXTCOLOR 242 279 352 478
- TITLE 320 340 341
- TRUNC 398 399 406 407
- ULX 59 76
- ULY 59 77
- UPPERLEFTX 142 147 148 152 155 156 175 186 186 211 220
- 220 223 226 229 237 238 376 379 380 384 387
- 387 388
- UPPERLEFTY 142 147 148 149 150 175 210 220 223 226 229
- 229 237 238 376 379 380 381 382
- W1 14 184 280 346 354
- W2 14 185 280 347 354
- WHEREX 184 346
- WHEREY 185 347
- WINDOW 102 236 237 276 277 348 350 447
- WINDOWS 310 331 333 334 335 336 337 338 339 341 344
- WINDOWTYPE 142 147 148 149 152 153 155 156 157 176 189
- 189 198 198 219 220 223 226 229 376 379 380
- 380 381 384 385 387 388 389
- WINDOW_REC 13 23
- WINDOW_TITLE 283 341
- WIN_NUM 309 331 331 333 334 335 336 337 338 339 340
- 340 341 341 344 350 350 351 351 352 352 354
- 354 354 355
- WRITE 469 471 473 481
- WRITELN 201
- WRITEXY 115 147 148 149 152 153 155 156 157
- WRITE_SCREEN 359 379 380 381 384 385 387 388 389
- WT 392 449 453
- X1 14 76 259 277 292 295 350 392 398 398 406
- 406 410 410 414 417 420
- X2 14 78 259 277 351 392 398 406 411 411 422
- 422 425 428
- XCOORD 115 134 137 137 359 369 372 372
- Y1 14 77 258 277 292 295 350 392 399 399 407
- 407 408 408 430 433 436
- Y2 14 79 258 277 351 392 399 407 409 409 438
- 438 441 444
- YCOORD 115 134 359 369
- 09 Aug 1985 at 08 : 30 Functions and Procedures for : DEFDEMO.PAS Page 1
-
-
- Line Function Name Passed Variables
-
- 54 Active : integer
-
- Line Procedure Name Passed Variables
-
- 175 Add_window (UpperLeftX,UpperLeftY,LowerRightX,LowerRightY,Foreground,
- 245 Color_window (Foreground, Background: integer)
- 142 Frame (WindowType, UpperLeftX, UpperLeftY, LowerRightX, LowerRightY, color: Integer)
- 376 Grow_Frame (WindowType, UpperLeftX, UpperLeftY, LowerRightX, LowerRightY, color: Integer)
- 392 Grow_Window (x1,y1,x2,y2,c1,c2,wt:integer)
- 160 Initialize
- 90 Pop
- 59 Push (Ulx, Uly, Lrx, Lry, Foreground, Background: integer)
- 265 Remove (Num_to_Remove: Integer)
- 44 Scrn_off
- 49 Scrn_on
- 309 Select_Window (Win_Num: Integer)
- 29 Set_page (page: byte)
- 283 Window_Title (Name: Maxstr; color:integer)
- 359 Write_Screen (long_string:maxstr; xcoord,ycoord,color: integer)
- 115 Writexy (long_string:maxstr; xcoord,ycoord:integer; var color: integer)
-
-
- Number Include Files : 4
- Total Number Functions : 1
- Total Number Procedures : 16
- Total Different Variables : 122
- Total Variables Used : 1288
- Total Lines Processed : 490